<template>
    <div class="repair-list">
        <h2>维修设置</h2>
        <el-row>
            <el-col :span="6">
                
            </el-col>
            <el-col :span="18">
                <div class="repair-rule">
                    维修规则：
                    <el-input
                        placeholder="请输入规则"
                        v-model="this.repairRule"
                        prefix-icon="el-icon-edit-outline"
                        clearable>
                    </el-input>
                </div>
            </el-col>
        </el-row>
        <ProjectRepairListTable :tableData='this.repairData' @editRepairItem="editRepairItem"  /> 
    </div>
</template>

<script>
import ProjectRepairListTable from '@/components/project/projectrepair/ProjectRepairListTable.vue'
import {mapState, mapMutations} from 'vuex'
export default {
    components:{
        ProjectRepairListTable,
    },
    data(){
         return {
             
        }
    },
    computed:{
        ...mapState({
            repairData:state => state.project.repairData,
            repairRule:state => state.project.repairRule
        })
    },
    methods:{
        ...mapMutations({
            addRepair:'project/addRepair',
            editRepairItem:'project/editRepairItem'
        }),
        addRepairData(data){
            this.addRepair(data);
        },
        editRepairItem(data){
            this.editRepairItem(data);
        }
    },
    mounted(){

    }
}
</script>

<style lang="scss" scoped>
    .repair-list .el-row{
        margin: 20px auto;
    }
    .repair-list .repair-rule .el-input{
        width: 70%;
    }
</style>

